#pragma once
// -------------------------------------------------
// BlinKit - BlinKit Library
// -------------------------------------------------
//   File Name: settings.h
// Description: Settings
//      Author: Ziming Li
//     Created: 2020-10-24
// -------------------------------------------------
// Copyright (C) 2020 MingYang Software Technology.
// -------------------------------------------------

#ifndef BLINKIT_BLINKIT_SETTINGS_H
#define BLINKIT_BLINKIT_SETTINGS_H

#include "blinkit/blink/renderer/core/editing/EditingBehaviorTypes.h"
#include "blinkit/blink/renderer/core/editing/SelectionStrategy.h"
#include "blinkit/blink/public/platform/PointerProperties.h"
#include "blinkit/blink/public/platform/WebDisplayMode.h"
#include "blinkit/blink/renderer/platform/FontFamilyNames.h"
#include "blinkit/blink/renderer/platform/graphics/ImageAnimationPolicy.h"
#include "blinkit/blink/renderer/wtf/Allocator.h"
#include "blinkit/blink/renderer/wtf/text/WTFString.h"

namespace blink {

class Settings
{
    STATIC_ONLY(Settings);
public:
    static constexpr bool acceleratedCompositingEnabled(void) { return true; }
    static constexpr bool allowCustomScrollbarInMainFrame(void) { return true; }
    static constexpr bool caretBrowsingEnabled(void) { return false; }
    static constexpr bool deviceSupportsMouse(void) { return true; }
    static constexpr bool downloadableBinaryFontsEnabled(void) { return true; }
    static constexpr bool forceZeroLayoutHeight(void) { return false; }
    static constexpr bool ignoreMainFrameOverflowHiddenQuirk(void) { return false; }
    static constexpr bool imagesEnabled(void) { return true; }
    static constexpr bool inertVisualViewport(void) { return false; }
    static constexpr bool loadsImagesAutomatically(void) { return true; }
    static constexpr bool mainFrameClipsContent(void) { return true; }
    static constexpr bool passwordEchoEnabled(void) { return false; }
    static constexpr bool preferCompositingToLCDTextEnabled(void) { return false; }
    static constexpr bool reportScreenSizeInPhysicalPixelsQuirk(void) { return false; }
    static constexpr bool reportWheelOverscroll(void) { return false; }
    static constexpr bool resizeIsDeviceSizeChange(void) { return false; }
    static constexpr bool rootLayerScrolls(void) { return false; }
    static constexpr bool scrollAnimatorEnabled(void) { return false; }
    static constexpr bool selectionIncludesAltImageText(void) { return false; }
    static constexpr bool shrinksViewportContentToFit(void) { return false; }
    static constexpr bool shouldClearDocumentBackground(void) { return true; }
    static constexpr bool shouldPrintBackgrounds(void) { return false; }
    static constexpr bool shouldRespectImageOrientation(void) { return false; }
    static constexpr bool showContextMenuOnMouseUp(void) { return false; }
    static constexpr bool smartInsertDeleteEnabled(void) { return false; }
    static constexpr bool textAreasAreResizable(void) { return false; }
    static constexpr bool textAutosizingEnabled(void) { return false; }
    static constexpr bool useLegacyBackgroundSizeShorthandBehavior(void) { return false; }
    static constexpr bool useSolidColorScrollbars(void) { return false; }
    static constexpr bool usesEncodingDetector(void) { return false; }
    static constexpr bool viewportEnabled(void) { return false; }
    static constexpr bool viewportMetaEnabled(void) { return false; }
    static constexpr bool viewportMetaZeroValuesQuirk(void) { return false; }
    static constexpr bool viewportMetaMergeContentQuirk(void) { return false; }

    static constexpr int availableHoverTypes(void) { return HoverTypeNone; }
    static constexpr int availablePointerTypes(void) { return PointerTypeNone; }
    static constexpr int defaultFixedFontSize(void) { return 16; }
    static constexpr int defaultFontSize(void) { return 16; }
    static constexpr int minimumFontSize(void) { return 10; }
    static constexpr int minimumLogicalFontSize(void) { return 10; }
    static constexpr double passwordEchoDurationInSeconds(void) { return 1.0; }

    static constexpr WebDisplayMode displayModeOverride(void) { return WebDisplayModeUndefined; }
    static constexpr ImageAnimationPolicy imageAnimationPolicy(void) { return ImageAnimationPolicyAllowed; }
    static constexpr HoverType primaryHoverType(void) { return HoverTypeNone; }
    static constexpr PointerType primaryPointerType(void) { return PointerTypeNone; }
    static constexpr SelectionStrategy selectionStrategy(void) { return SelectionStrategy::Character; }

    static String defaultTextEncodingName(void) { return String("UTF-8"); }
    static const AtomicString& StandardFontFamilyName(void) { return FontFamilyNames::webkit_standard; }

#if defined(_Z_OS_WINDOWS)
    static constexpr EditingBehaviorType editingBehaviorType(void) { return EditingWindowsBehavior; }
    static constexpr bool selectTrailingWhitespaceEnabled(void) { return true; }
#elif defined(_Z_OS_MACOS)
    static constexpr EditingBehaviorType editingBehaviorType(void) { return EditingMacBehavior; }
    static constexpr bool selectTrailingWhitespaceEnabled(void) { return false; }
#endif
};

} // namespace blink

#endif // BLINKIT_BLINKIT_SETTINGS_H
